package com.kashow.bean.message.unread.chat;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by yybs on 16/11/28.
 */

public class ChatUser implements Parcelable {
    private String userId;
    private String userName;
    private String headimgurl;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userId);
        dest.writeString(this.userName);
        dest.writeString(this.headimgurl);
    }

    public ChatUser() {
    }

    protected ChatUser(Parcel in) {
        this.userId = in.readString();
        this.userName = in.readString();
        this.headimgurl = in.readString();
    }

    public static final Creator<ChatUser> CREATOR = new Creator<ChatUser>() {
        @Override
        public ChatUser createFromParcel(Parcel source) {
            return new ChatUser(source);
        }

        @Override
        public ChatUser[] newArray(int size) {
            return new ChatUser[size];
        }
    };

    @Override
    public String toString() {
        return "ChatUser{" +
                "userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", headimgurl='" + headimgurl + '\'' +
                '}';
    }
}
